# coding=utf-8
"""
作者：董新强 
创建时间：
描述：
"""


class AnswerModel:
    def __init__(self, msg, qid=0, finished=0, score=0, dic_others: dict = None):
        self.qid = qid
        self.msg = msg
        self.finished = finished
        self.score = score
        self.dic_other = dic_others

    def json(self):
        dic = {
            'qid': self.qid,
            'msg': self.msg,
            'finished': self.finished,
            'score': self.score,
        }
        if self.dic_other:
            dic.update(self.dic_other)
        return dic
